﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace com.yd.sdk.api
{
    /// <summary>
    /// 广告类型
    /// </summary>
    public enum AdType
    {
        Banner,
        Interstitial,
        Reward
    }

    /// <summary>
    /// 横幅广告位置
    /// </summary>
    public enum BannerPos
    {
        Top,
        Bottom
    }

    /// <summary>
    /// 
    /// </summary>
    public enum AdStatus
    {
        Unknow,      //未知
        Initialized, //已经初始化
        LoadedSucess,//加载成功
        LoadedFailed,//加载失败
        LoadedFailedOverCount,//加载失败次数超过限制
    }
    
    /// <summary>
    /// 定义用户广告行为
    /// </summary>
    public interface IAd
    {
        /// <summary>
        /// 设置测试设备
        /// </summary>
        /// <param name="ids"></param>
        void SetTestDeviceIds(string ids);
        /// <summary>
        /// 设置adId
        /// </summary>
        /// <param name="bannerId">横幅id</param>
        /// <param name="interstitialId">插入id</param>
        /// <param name="rewardId">激励id</param>
        void SetAdIds(string bannerId, string interstitialId, string rewardId);
        
        /// <summary>
        /// 加载广告
        /// </summary>
        /// <param name="adType">广告类型</param>
        void LoadedAd(AdType adType);

        /// <summary>
        /// 判断广告是否可用
        /// </summary>
        /// <param name="adType">广告类型</param>
        /// <returns></returns>
        bool IsAdAvailable(AdType adType);
        
        
        /////////////分成3个函数的原因可能会有不同的参数////////////////////////////
        /// <summary>
        /// 展示横幅广告
        /// </summary>
        /// <param name="pos"></param>
        void ShowBanner(BannerPos pos = BannerPos.Bottom);
        
        /// <summary>
        /// 展示插入式广告
        /// </summary>
        void ShowInterstitial();
        
        /// <summary>
        /// 展示激励广告
        /// </summary>
        void ShowReward();
        
        /// <summary>
        /// 隐藏广告
        /// </summary>
        /// <param name="adType"></param>
        void HideAd(AdType adType);
        
    }
}

